﻿<%@ Page Language="C#" %>

<%@ Import Namespace="wojilu" %>
<%@ Import Namespace="wojilu.View" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Domain" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Service" %>

<%var modelatt = v.data("modelatt") as List<Model_Att>; %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>#{softtitle}</title>
<link href="#{path.css}ybb/css/baselist.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<link href="#{path.css}ybb/css/all.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<link href="#{path.css}ybb/css/formdiv.css?v=#{cssVersion}" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="#{path.js}ybb/js/jquery.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/form.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/control.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="/static/public/tinyMCE/jquery.tinymce.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/dialog.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/colorpicker.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/initedit.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/My97DatePicker/WdatePicker.js?v=#{jsVersion}"></script>
<script type="text/javascript">

	var resizewindow= null;

	window.onresize = function(){
		var h = $(window).height();
		if(resizewindow!=h){
			sizewindow();
			resizewindow=h;
		}
	}

	function sizewindow(){
		var h = $(window).height();
		if(document.getElementById("mainbodybottonauto")){
			$('.managebottonadd').css({height:h-40});
		}
	}
	var article_js_noselect_empty  = "_{article_js_noselect_empty}";
	var article_js_input_err  = "_{article_js_input_err}";
	var article_doc_add_tid  = "_{article_doc_add_tid}";
	var article_js_link_empty  = "_{article_js_link_empty}";
	var article_js_template_empty  = "_{article_js_template_empty}";
	var article_js_filename_empty  = "_{article_js_filename_empty}";
	var article_js_doc_add_ok = "_{article_js_doc_add_ok}";
	var article_js_doc_add_ok2 = "_{article_js_doc_add_ok2}";
	var article_js_doc_add_no = "_{article_js_doc_add_no}";
	var refalse = "#{refalse}";
	var imagestitle="_{filemanage_select_title}";
	var addbottonname="_{selectfile_botton}";
	var remimages="_{remimages_botton}";
	var adminurl = "#{adminurl}";
	var mid = "#{mid}";
	var iframename = "#{iframename}";
	iframename = iframename=='' ? "jerichotabiframe_0" : iframename;

	$(document).ready(function(){
	    editshow("#content");
	    <%foreach(var row in modelatt){%>
        <%if (row.inputtype == "editor" && row.attrname != "content") {%>
		editsimpleshow("#<%=row.attrname%>");
		<%}%>
		<%}%>

		$('#color').EasySiteColorSelect();
		var h = '#{iframeheightwindow}';
		$('.managebottonadd').css({height:h-40});
		var options = {
			beforeSubmit: formverify,
			success:saveResponse,
			resetForm: false
		};
		$('#docadd').submit(function() {
			$(this).ajaxSubmit(options);
			return false;
		});
		parent.scrolclear();
	})




	function formverify(formData, jqForm, options) {
		for (var i=0; i< formData.length; i++){
		    <%foreach(var row in modelatt){%>
            <%if(row.inputtype =="editor"){%>
		        if (formData[i].name == "<%=row.attrname%>"){
		            formData[i].value=tinyMCE.get('<%=row.attrname%>').getContent();
				}
		    <%}%>
		    <%}%>
		}
		var queryString = $.param(formData);
		var get=urlarray(queryString);

	    <%foreach(var row in modelatt){%>
            <%if(row.isvalidate ==1){%>
            <%if(row.validatetext !=""){%>
	            if(get['<%=row.attrname%>'].match(<%=row.validatetext%>ig)==null) {
			<%}else{%>
				if(get['<%=row.attrname%>']==''){
			<%}%>
				document.docadd.<%=row.attrname%>.focus();
				alert('<%=row.typename%>'+article_js_input_err);
				return false;
			}
			<%}%>
		<%}%>

		if(get['islink']==1){
			if(get['link'].match(/^http:\/\/[a-zA-Z\:.0-9-%@#;&?=/_]+$/ig)==null) {
				document.docadd.link.focus();
				alert(article_js_link_empty);
				return false;
			}
		}

		if(get['tid']==0){
			document.docadd.tid.focus();
			alert(article_doc_add_tid+article_js_noselect_empty);
			return false;
		}
		if(get['istemplates']==1){
			if(get['template'].match(/^[\w-]+$/ig)==null) {
				document.docadd.template.focus();
				alert(article_js_template_empty);
				return false;
			}
		}
		if(get['filename']!=''){
			if(get['filename'].match(/^[\w-//]+$/ig)==null) {
				document.docadd.filename.focus();
				alert(article_js_filename_empty);
				return false;
			}
		}
		parent.windowsdig('Loading','iframe:#{load}','400px','180px','iframe',false);
	}
	function saveResponse(options){
		parent.closeifram();
		if (options=='true'){
			if(parent.frames[iframename].document.getElementById("selectform")){
				parent.frames[iframename].refresh('selectform','selectall','check_all');
			}
			if (refalse!='1'){
				alert(article_js_doc_add_ok);
			}else{
				alert(article_js_doc_add_ok2);
			}
		}else{
			alert(article_js_doc_add_no+'Return message:'+options);
		}
		if (refalse!='1'){
			parent.scrolopen();
			parent.onaletdoc();
		}else{
			window.location.reload();
		}
	}
</script>
</head>

<body>
<form name="docadd" id="docadd" method="post" action="#{ActionLink}">
<input type="hidden" name="inputclass" value="add" />
<input type="hidden" name="tab" id="docaddtab" value="#{tab}" />
<input type="hidden" name="mid" id="mid" value="#{mid}" />
<input type="hidden" name="lng" id="lng" value="#{lng}" />
<div id="mainbodybottonauto" class="managebottonadd">
	<div class="maindobycontent">
		<div class="suggestion">
			<span class="sugicon"><span class="strong colorgorning2">_{article_doc_tab_title}</span> <span class="colorgorningage">#{modelview.modelname}</span></span>
		</div>
		<div class="manageeditdiv">
			<div class="maneditcontent">
				<table class="formtable">
                    <%var modelview = v.data("modelview") as Model; %>
                    <%if(modelview.istsn == 1){ %>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_tsn}</td>
						<td class="trtitle02">
							<input type="text" name="tsn" size="25" maxlength="20" value="#{tsn}" id="tsn" class="infoInput"/>
							<span class="cautiontitle" id="dirnameerr">_{article_doc_add_tsn_mess}</span>
						</td>
					</tr>
					<%} %>
					<%foreach(var row in modelatt){%>
						<tr class="trstyle2">
							<td class="trtitle01<%if(row.isvalidate ==1){ %>1<%} %>"><%=row.typename %></td>
							<td class="trtitle02">
                                <%if (row.inputtype == "string" || row.inputtype == "int" || row.inputtype == "float" || row.inputtype == "decimal") { %>
								<input type="text" name="<%=row.attrname %>" size="<%=row.attrsize %>" id="<%=row.attrname %>" value="<%=row.attrvalue %>" maxlength="<%=row.attrlenther %>" class="infoInput"/>
                                <%} else if (row.inputtype == "text" || row.inputtype == "editor" || row.inputtype == "htmltext") { %>
								<textarea name="<%=row.attrname %>" id="<%=row.attrname %>"  style="width:99%;height:<%=row.attrrow %>px;" class="infoInput"><%=row.attrvalue %></textarea>
                                <%} else if (row.inputtype == "img") { %>
								<ul class="addpiclist">
									<li id="addsrli<%=row.attrname %>"><a title="_{selectfile_botton}" onclick="javascript:parent.windowsdig('_{filemanage_select_title}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.PublicController().FileWindow) %>?action=filewindow&listfunction=filelist&filetype=img&checkfrom=picshow&getbyid=addsrli<%=row.attrname %>&fileinputid=<%=row.attrname %>&maxselect=1&iframename='+self.frameElement.getAttribute('name'),'900px','480px','iframe')" href="#body"><p><img id="addsr<%=row.attrname %>" src="#{path.img}ybb/images/pic.png"></p></a></li>
								</ul>
								<input type="hidden" name="<%=row.attrname %>" id="<%=row.attrname %>"/>
                                <%} else if (row.inputtype == "selectinput") { %>
								<input type="text" name="<%=row.attrname %>s" size="<%=row.attrsize %>" id="<%=row.attrname %>" value="" maxlength="<%=row.attrlenther %>" class="infoInput"/>
								<select size="1" name="<%=row.attrname %>selectinputvalue" onchange="javascript:$('#<%=row.attrname %>').val(this.value)">
									<option value="">_{botton_select_name}<%=row.typename %></option>
                                    <%var strArray = row.attrvalue.SplitStringh(); %>
									<%foreach (var row1 in strArray){ %>
									<option value="<%=row1 %>"><%=row1 %></option>
									<%} %>
								</select>
                                <%} else if (row.inputtype == "addon") { %>
								<input type="text" name="<%=row.attrname %>" size="<%=row.attrsize %>" id="<%=row.attrname %>" value="" maxlength="<%=row.attrlenther %>" class="infoInput"/>
								<a class="filecheck" onclick="javascript:parent.windowsdig('_{filemanage_select_title}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.PublicController().FileWindow) %>?listfunction=filelist&filetype=file&checkfrom=input&getbyid=&fileinputid=<%=row.attrname %>&maxselect=1&iframename='+self.frameElement.getAttribute('name'),'900px','480px','iframe')" href="#body">_{selectfile_botton}</a>
                                <%} else if (row.inputtype == "video") { %>
								<input type="text" name="<%=row.attrname %>" size="<%=row.attrsize %>" id="<%=row.attrname %>" value="" maxlength="<%=row.attrlenther %>" class="infoInput"/>
								<a class="movercheck" onclick="javascript:parent.windowsdig('_{filemanage_select_title}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.PublicController().FileWindow) %>?listfunction=filelist&filetype=mover&checkfrom=input&getbyid=&fileinputid=<%=row.attrname %>&maxselect=1&iframename='+self.frameElement.getAttribute('name'),'900px','480px','iframe')" href="#body">_{selectfile_botton}</a>
                                <%} else if (row.inputtype == "datetime") { %>
								<input type="text" name="<%=row.attrname %>" size="<%=row.attrsize %>" id="<%=row.attrname %>" value="<%=row.attrvalue %>" maxlength="<%=row.attrlenther %>" class="infoInput"/>
								<a class="datetime" onclick="WdatePicker({el:'<%=row.attrname %>',readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" href="#body">_{selectdata_botton}</a>
                                <%} else if (row.inputtype == "select") { %>
								<select size="1" name="<%=row.attrname %>" id="<%=row.attrname %>">
									<option value="">_{botton_select_name}<%=row.typename %></option>
									<%var strArray = row.attrvalue.SplitStringh(); %>
									<%foreach (var row1 in strArray){ %>
									<option value="<%=row1 %>"><%=row1 %></option>
									<%} %>
								</select>
                                <%} else if (row.inputtype == "radio") { %>
									<%var strArray = row.attrvalue.SplitStringh(); %>
									<%foreach (var row1 in strArray){ %>
									<input type="radio" value="<%=row1 %>" name="<%=row.attrname %>" /> <%=row1 %>&nbsp;
									<%} %>
                                <%} else if (row.inputtype == "checkbox") { %>
									<%var strArray = row.attrvalue.SplitStringh(); %>
									<%foreach (var row1 in strArray){ %>
									<input type="checkbox" value="<%=row1 %>" name="[%$modelatt[list].attrname%][]"/> [%$modelatt[list].attrvalue[ii].name%]&nbsp;
									<%} %>
								<%} %>
								<%if (row.attrname == "title") { %><input id="color" name="color" value="#{input_color}"/><%} %>
								<%if(row.typeremark !=""){ %><span class="cautiontitle"><%=row.typeremark %></span><%} %>
							</td>
						</tr>
                        <%if (row.attrname == "content") { %>
						<tr class="trstyle2">
							<td class="trtitle01"></td>
							<td class="trtitle02 colorgblue">
                                <%var input_isdellink = Convert.ToInt32(v.data("input_isdellink")); %>
								<input type="checkbox" value="1" name="input_isdellink" <%if(input_isdellink ==1){ %>checked="checked"<%} %> /> _{article_doc_add_content_b1}&nbsp;
								<input type="checkbox" value="1" name="donwloadpic"/> _{article_doc_add_content_b2}&nbsp;
							</td>
						</tr>
						<%} %>
					<%} %>
					<tr class="trstyle2">
						<td class="trtitle03" colspan="2">_{article_doc_tab_title01}</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01"></td>
						<td class="trtitle02">
							<a class="keyselect" href="#body" onclick="javascript:parent.windowsdig('_{selecttag_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.SEOController().SEOSelect) %>?inputtext=tags&listfunction=key&checkfrom=input&mid=#{mid}&tid='+document.docadd.tid.value+'&iframename='+self.frameElement.getAttribute('name'),'650px','380px','iframe');">_{selecttag_botton}</a>
						</td>
					</tr>
					<tr class="trstyle3">
						<td class="trtitle01">_{article_doc_add_tags}</td>
						<td class="trtitle02">
							<input type="text" name="tags" id="tags" maxlength="100" class="infoInput" style="width:98%;"/>
						</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01"></td>
						<td class="trtitle02"><span class="cautiontitle">_{article_doc_add_tags_mess}</span></td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_headtitle}</td>
						<td class="trtitle02"><input type="text" name="headtitle" id="headtitle" maxlength="100" class="infoInput" style="width:98%;"/></td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01"></td>
						<td class="trtitle02">
							<a class="keyselect" href="#body" onclick="javascript:parent.windowsdig('_{selectkeytype_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.SEOController().SEOSelect) %>?inputtext=keywords&listfunction=keytype&checkfrom=function&maxselect=1&mid=#{mid}&tid='+document.docadd.tid.value+'&iframename='+self.frameElement.getAttribute('name'),'850px','450px','iframe');">_{selectkeytype_botton}</a>
							<a class="keyselect" href="#body" onclick="javascript:parent.windowsdig('_{selectkeyword_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.SEOController().SEOSelect) %>?inputtext=keywords&listfunction=key&checkfrom=input&mid=#{mid}&tid='+document.docadd.tid.value+'&iframename='+self.frameElement.getAttribute('name'),'650px','380px','iframe');">_{selectkeyword_botton}</a>
						</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_keywords}</td>
						<td class="trtitle02">
							<input type="text" name="keywords" id="keywords" maxlength="100" class="infoInput" style="width:98%;"/>
						</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_description}</td>
						<td class="trtitle02">
							<textarea name="description" id="description"  style="width:98%;height:50px;" class="smallInput"></textarea>
						</td>
					</tr>

					<tr class="trstyle2">
						<td class="trtitle03" colspan="2">_{article_doc_tab_title02}</td>
					</tr>

                    <%var doclabel = v.data("labellist") as List<Document_Label>; %>
                    <%if(doclabel.Count>0 && modelview.isbase ==0) { %>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_recommend}</td>
						<td class="trtitle02" style="line-height: 200%">
                            <%var i = 0; %>
							<%foreach(var row in doclabel){ %>
                                <%i++; %>
								<input type="checkbox" value="<%=row.Id %>" name="recommend[]"/> <%=row.labelname %>&nbsp;
								<%if(i % 5==0){ %><br /><%} %>
							<%} %>
						</td>
					</tr>
					<%} %>
                    <%var typelist = v.data("typelist") as List<TypeList>; %>
                    <%if(modelview.isbase == 0){ %>
					<tr class="trstyle2">
						<td class="trtitle011">_{article_doc_add_tid}</td>
						<td class="trtitle02">
							<select size="1" name="tid" id="tid">
								<option selected="selected" value="0">_{article_doc_add_tid_option}</option>
								<%foreach(var row in typelist){ %>
								<option <%if(Convert.ToInt32(v.data("tid")) == row.Id){ %>selected<%} %> value="<%=row.Id %>"><%if(row.level1 >0){ %>├<%} %><%for(var i=1;i<row.level1;i++){ %>─<%} %> <%=row.typename %></option>
								<%} %>
							</select>
						</td>
					</tr>
					<%} %>
                    <%if(modelview.isextid ==1){ %>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_extid}</td>
						<td class="trtitle02">
							<select size="3" name="extid[]" id="extid" multiple="multiple">
								<optgroup label="_{article_doc_add_extid_option}">
								<%foreach(var row in typelist){ %>
								<option value="<%=row.Id %>"><%if(row.level1 >0){ %>├<%} %><%for(var i=1;i<row.level1;i++){ %>─<%} %> <%=row.typename %></option>
								<%} %>
								</optgroup>
							</select>
						</td>
					</tr>
					<%} %>
                    <%if(modelview.issid ==1){ %>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_sid}</td>
						<td class="trtitle02">
							<select size="1" name="sid" id="sid">
								<option selected="selected" value="0">_{article_doc_add_sid_option}</option>
                                <%var subjectlistarray = v.data("subjectlistarray") as List<SubjectList>; %>
								<%foreach(var row in subjectlistarray){ %>
								<option value="<%=row.Id %>"><%=row.subjectname %></option>
								<%} %>
							</select>
						</td>
					</tr>
					<%} %>
                    <%if(modelview.isfgid ==1){ %>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_fgid}</td>
						<td class="trtitle02">
							<select size="1" name="fgid" id="fgid">
								<option selected="selected" value="0">_{article_doc_add_fgid_option}</option>
                                <%var formarray = v.data("formarray") as List<Form_Group>; %>
								<%foreach(var row in formarray){ %>
								<option value="<%=row.Id %>"><%=row.formgroupname %></option>
								<%} %>
							</select>
							<span class="cautiontitle" id="dirnameerr">_{article_doc_add_fgid_mess}</span>
						</td>
					</tr>
					<%} %>
                    <%if(modelview.ispurview ==1){ %>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_purview}</td>
						<td class="trtitle02">
							<select size="1" name="purview" id="purview">
								<option selected="selected" value="0">_{article_doc_add_purview_option}</option>
                                <%var memberpuvlist = v.data("memberpuvlist") as List<Member_Class>; %>
								<%foreach(var row in memberpuvlist){ %>
								<option value="<%=row.Id %>"><%=row.rankname %></option>
								<%} %>
							</select>
						</td>
					</tr>
					<%} %>
                    <%if(modelview.isbase==0){ %>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_addtime}</td>
						<td class="trtitle02">
							<input type="text" name="addtime" size="20" maxlength="30" id="addtime" value="<%=time.FormatDate(DateTime.Now,1) %>" class="infoInput" />
							<a class="datetime" onclick="WdatePicker({el:'addtime',isShowClear:false,readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" href="#body">_{selectdata_botton}</a>
						</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_click}</td>
						<td class="trtitle02">
							<input type="text" name="click" size="5" maxlength="5" id="click" value="#{input_click}" class="infoInput"/>
							<span class="cautiontitle">_{article_doc_add_click_mess}</span>
						</td>
					</tr>
					<%} %>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_islink}</td>
						<td class="trtitle02">
							<input type="radio" value="1" name="islink" onclick="ondisplay('islinkdiv','trstyle2 displaytrue')" /> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="islink" onclick="ondisplay('islinkdiv','trstyle2 displaynone')"checked="checked"/> _{close_botton_title}
							<span class="cautiontitle">_{article_doc_add_islink_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 displaynone" id="islinkdiv">
						<td class="trtitle011">_{article_doc_add_link}</td>
						<td class="trtitle02">
							<input type="text" name="link" size="50" maxlength="230" class="infoInput"/>
							<span class="cautiontitle">_{article_doc_add_link_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle03" colspan="2">_{article_doc_tab_title03}</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_ishtml}</td>
						<td class="trtitle02">
							<input type="radio" value="1" name="ishtml" checked="checked"/> _{article_doc_add_ishtml_1}&nbsp;
							<input type="radio" value="0" name="ishtml"/> _{article_doc_add_ishtml_0}
						</td>
					</tr>
                    <%if(modelview.isorder ==1){ %>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_isorder}</td>
						<td class="trtitle02">
							<input type="radio" value="1" name="isorder" checked="checked"/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="isorder"/> _{close_botton_title}
							<span class="cautiontitle">_{article_doc_add_isorder_mess}</span>
						</td>
					</tr>
					<%} %>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_istemplates}</td>
						<td class="trtitle02">
							<input type="radio" value="1" name="istemplates" onclick="ondisplay('istemplatesdiv','trstyle2 displaytrue')"/> _{open_botton_title}&nbsp;
							<input type="radio" value="0" name="istemplates" onclick="ondisplay('istemplatesdiv','trstyle2 displaynone')" checked="checked"/> _{close_botton_title}
							<span class="cautiontitle">_{article_doc_add_istemplates_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2 displaynone" id="istemplatesdiv">
						<td class="trtitle011">_{article_doc_add_template}</td>
						<td class="trtitle02">
							<input type="text" name="template" id="templatename" size="40" maxlength="100" class="infoInput"/>
							<a class="filecheck" href="#body" onclick="javascript:parent.windowsdig('_{selecttempfile_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.TemplateController().TemplateMain) %>?action=listwindow&inputtext=templatename&typeclass=article&skindir=&filedir=article&fileclass=&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),'750px','400px','iframe');">_{selecttempfile_botton}</a>
							<span class="cautiontitle">_{article_doc_add_template_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_filename}</td>
						<td class="trtitle02">
							<input type="text" name="filename" size="40" maxlength="50" class="infoInput"/>
							<span class="cautiontitle">_{article_doc_add_filename_mess}</span>
						</td>
					</tr>
                    <%if(modelview.ismessage==1){ %>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_ismessage}</td>
						<td class="trtitle02">
							<input type="radio" value="1" name="ismessage" checked="checked"/> _{article_doc_add_ismessage_1}&nbsp;
							<input type="radio" value="0" name="ismessage"/> _{article_doc_add_ismessage_0}
						</td>
					</tr>
					<%} %>
                    <%if(modelview.isalbum == 1){ %>
					<tr class="trstyle2">
						<td class="trtitle03" colspan="2">_{article_doc_tab_title00}</td>
					</tr>
					<tr class="trstyle3">
						<td class="trtitle01">_{article_doc_add_piclist}</td>
						<td class="trtitle02">
							<a class="picselect" href="#body" onclick="javascript:parent.windowsdig('_{selectpic_botton}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.PublicController().FileWindow) %>?listfunction=filelist&filetype=img&checkfrom=function&getbyid=addpiclist&fileinputid=albumlist&maxselect=20&iframename='+self.frameElement.getAttribute('name'),'900px','480px','iframe')">_{selectpic_botton}</a>
							<span class="cautiontitle">_{selectpic_botton_mess}</span>
						</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01"></td>
						<td class="trtitle02">
							<ul class="albumlistinput" id="addpiclist" ></ul>
							<input type="hidden" name="albumlist" id="albumlist"/>
						</td>
					</tr>
					<%} %>
                    <%if(modelview.islinkdid == 1){ %>
					<tr class="trstyle2">
						<td class="trtitle03" colspan="2">_{article_doc_tab_title04}</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01">_{article_doc_add_linkdid}</td>
						<td class="trtitle02">
							<a class="filecheck" href="#body" onclick="javascript:parent.windowsdig('_{article_doc_add_linkdid}','iframe:<%=link.to(new wojilu.Web.Controller.Admin.Qycms.ArticleController().Article_Window) %>?checkfrom=function&getbyid=infolinked&inputtext=linkdid&mid=#{mid}&tid=#{tid}&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),'800px','400px','iframe');">选择内容</a>
						</td>
					</tr>
					<tr class="trstyle2">
						<td class="trtitle01"></td>
						<td class="trtitle02">
							<ul class="infolinked" id="infolinked"></ul>
							<input type="hidden" name="linkdid" id="linkdid"/>
						</td>
					</tr>
					<%} %>
				</table>
			</div>
		</div>
	</div>
</div>
<div id="downbotton">
	<div id="subbotton">
		<table width="100%">
			<tr>
				<td id="right"><input type="submit" id="docaddsubmitbotton" name="Submit" value="_{botton_add}" class="buttonface" /></td>
				<td id="left" class="padding-left5"><input type="button" name="cancel" onClick="javascript:closewindow();" value="_{botton_add_reset}" class="buttonface" /></td>
			</tr>
		</table>
	</div>
</div>
</form>
</body>

</html>


